home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / HDX_BACK / HDXPCH / MYAS.S < prev    next >
Encoding:
Text File  |  2001-02-09  |  838 b   |  25 lines

  1. ;+
  2. ; gparmfc() - get the current drive parameters for the C code
  3. ;
  4. ; gparmfc(addcyl, addhd, addspt, buf)
  5. ; char *addcyl;        $4(sp).l    /* the address of #cyl */
  6. ; char *addhd;        $8(sp).l    /* the address of #hd */
  7. ; char *addspt;        $c(sp).l     /* the address of #spt */
  8. ; char *buf;        $10(sp).l    /* the address of the date buffer */
  9. ; returns: put the values of #cyl, #hd, #spt into the given addresses 
  10. ;-
  11.     .extern _gcparm
  12.     .globl _gparmfc
  13. _gparmfc:
  14.     move.l $10(sp),-(sp); push the buffer address into the stack
  15.     bsr       _gcparm        ;
  16.     adda   #4,sp        ; clean up stack
  17.     move.l $4(sp),a0    ; a0 -> data buffer
  18.     move.w d0,(a0)        ; move the #cyl into its addr
  19.     move.l $8(sp),a0    ; a0 -> data buffer
  20.     move.w d1,(a0)        ; move the #hd into its addr
  21.     move.l $c(sp),a0    ; a0 -> data buffer
  22.     move.w d2,(a0)        ; move the #spt into its addr
  23.     rts
  24.